/*
 * @Author: zhangfeng
 * @Date: 2024-01-12 15:58:14
 * @LastEditTime: 2024-01-19 17:31:51
 * @LastEditors: zhangfeng
 * @Description:
 * @FilePath: \nodeapi\src\router\article.router.js
 * © 2023 张峰，All rights reserved.
 */
const KoaRouter = require("koa-router");

const {
  createArticle,
  getArticle,
  updateArticle,
  deleteArticle,
  uploadImage,
  uploadVideo,
} = require("../controller/article.controller");

const router = new KoaRouter({
  prefix: "/article",
});

router.post("/", createArticle);
router.get("/", getArticle);
router.patch("/", updateArticle);
router.delete("/", deleteArticle);

router.post("/upload/image", uploadImage);
router.post("/upload/video", uploadVideo);
module.exports = router;
